package cn.yuan.xiaoyu.testmodule.activity;

import android.os.Bundle;
import android.util.Log;

import com.alibaba.fastjson.JSON;

import butterknife.Bind;
import cn.yuan.xiaoyu.R;
import cn.yuan.xiaoyu.commonmodule.activity.BaseActivity;
import cn.yuan.xiaoyu.testmodule.bean.DayCalendarBean;
import cn.yuan.xiaoyu.testmodule.view.DayCalendarView;

/**
 * Created by yukuoyuan on 2017/5/5.
 * 测试日历控件的界面
 */
public class TestDayCalendarActivity extends BaseActivity {
    @Bind(R.id.dcv_test)
    DayCalendarView dcvTest;
    private String json = "{\n" +
            "    \"Items\": [\n" +
            "        {\n" +
            "            \"DoctorCode\": \"ZuoZuo2V2DXN6X8X8DJR\",\n" +
            "            \"DoctorName\": \"妞妞\",\n" +
            "            \"List\": null\n" +
            "        },\n" +
            "        {\n" +
            "            \"DoctorCode\": \"ZhouZhou0TV08XTP60R0\",\n" +
            "            \"DoctorName\": \"皱皱\",\n" +
            "            \"List\": null\n" +
            "        },\n" +
            "        {\n" +
            "            \"DoctorCode\": \"WangZuXianN6N04L84R4\",\n" +
            "            \"DoctorName\": \"王祖贤\",\n" +
            "            \"List\": [\n" +
            "                {\n" +
            "                    \"Id\": \"4c2b7560-1290-47f7-ac8e-ea0c05f72770\",\n" +
            "                    \"StartTime\": \"2017-05-08T11:00:00\",\n" +
            "                    \"EndTime\": \"2017-05-08T12:00:00\",\n" +
            "                    \"PatientName\": \"测试1\",\n" +
            "                    \"DoctorCode\": \"WangZuXianN6N04L84R4\",\n" +
            "                    \"DoctorName\": \"王祖贤\",\n" +
            "                    \"PatlogType\": 1,\n" +
            "                    \"PatientEnabled\": null,\n" +
            "                    \"Status\": 0,\n" +
            "                    \"AddDateTime\": \"2017-05-08T09:26:13.363\"\n" +
            "                },\n" +
            "                {\n" +
            "                    \"Id\": \"2c4ef02b-6e4d-4e68-8b79-fe9696c97a4a\",\n" +
            "                    \"StartTime\": \"2017-05-08T12:00:00\",\n" +
            "                    \"EndTime\": \"2017-05-08T13:00:00\",\n" +
            "                    \"PatientName\": \"测试2\",\n" +
            "                    \"DoctorCode\": \"WangZuXianN6N04L84R4\",\n" +
            "                    \"DoctorName\": \"王祖贤\",\n" +
            "                    \"PatlogType\": 1,\n" +
            "                    \"PatientEnabled\": null,\n" +
            "                    \"Status\": 0,\n" +
            "                    \"AddDateTime\": \"2017-05-08T09:27:19.523\"\n" +
            "                },\n" +
            "                {\n" +
            "                    \"Id\": \"226ad624-1837-4b74-850a-2263a1cf21bd\",\n" +
            "                    \"StartTime\": \"2017-05-08T12:00:00\",\n" +
            "                    \"EndTime\": \"2017-05-08T13:00:00\",\n" +
            "                    \"PatientName\": \"测试3\",\n" +
            "                    \"DoctorCode\": \"WangZuXianN6N04L84R4\",\n" +
            "                    \"DoctorName\": \"王祖贤\",\n" +
            "                    \"PatlogType\": 1,\n" +
            "                    \"PatientEnabled\": null,\n" +
            "                    \"Status\": 0,\n" +
            "                    \"AddDateTime\": \"2017-05-08T09:27:48.633\"\n" +
            "                }\n" +
            "            ]\n" +
            "        }\n" +
            "    ]\n" +
            "}";

    @Override
    protected void bindPresenter() {

    }

    @Override
    protected void initData(Bundle extras) {
        DayCalendarBean dayCalendarBean = JSON.parseObject(json, DayCalendarBean.class);
        dcvTest.setData(dayCalendarBean);
        Log.i("数字", Integer.parseInt("08") + "");
    }

    @Override
    public int getContentLayout() {
        return R.layout.activity_test_day_calendar;
    }

    @Override
    protected void initToolbar() {

    }

}
